import { h } from '@logicflow/core';
import { BaseOutModel, BaseOutView } from '../base/BaseOutNode';

class LogModel extends BaseOutModel {
  initNodeData(data: any): void {
    super.initNodeData(data);
    this.text.value = 'Log';
  }
}

class LogView extends BaseOutView {
  getIcon() {
    const { x, y } = this.props.model;
    const width = 30;
    const height = 40;
    return h('image', {
      width,
      height,
      x: x - width / 2,
      y: y - height / 2,
      href: '',
    });
  }
}

export default {
  type: 'Log',
  view: LogView,
  model: LogModel,
};
